package io;

import java.io.BufferedReader;
import java.io.FileReader;
import java.util.HashMap;
import java.util.StringTokenizer;

public class ConfReader {

	public HashMap<String, String> readConfFile(String inputFile)
			throws Exception {
		HashMap<String, String> conf = new HashMap<String, String>();
		BufferedReader br = new BufferedReader(new FileReader(inputFile));

		// loop meta infor
		String line;
		while ((line = br.readLine()).startsWith("#")) {
			// do nothing
		}

		conf.put("func", line);

		conf.put("nodesFile", br.readLine());
		conf.put("edgesFile", br.readLine());
		conf.put("facilitiesFile", br.readLine());
		conf.put("routesFile", br.readLine());
		conf.put("outFile", br.readLine());

		conf.put("delta", br.readLine());
		conf.put("numRoutesToRead", br.readLine());
		conf.put("numFacilitiesToRead", br.readLine());
		
		br.close();

		return conf;
	}

}
